package javaBase.nowcoder.HJ38_A_求小球落地5次后所经历的路程和第5次反弹的高度;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;

public class Main {
    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        Integer i = Integer.parseInt(br.readLine());
        int times = 0;
        BigDecimal height = new BigDecimal(i);
        BigDecimal length = new BigDecimal(i);
        while (times < 5) {
            height = height.divide(BigDecimal.valueOf(2));
            if(times != 4){
                length = length.add(height.multiply(BigDecimal.valueOf(2)));
            }
            times++;
        }
        System.out.println(length);
        System.out.println(height);
    }
}

